<template>
  <div class="total-sales-amount">
    <p>{{text}}：</p>
    <p class="price" :style="{color: numberColor}">{{type == 'price' ? '￥' : ''}}{{Number(number).toFixed(2)}}</p>
  </div>
</template>

<script>
export default {
  props:{
    type: {
      type: String,
      default: 'price'
    },
    text: {
      type: String,
      default: '总销售额'
    },
    number: {
      type: [String, Number],
      default: '0.00'
    },
    numberColor: {
      type: String,
      default: '#ef7a53'
    }
  }
}
</script>

<style scoped>
.total-sales-amount {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
  margin-top: 6px;
  border-bottom: 1px solid var(--line-between-color);
  background-color: #fff;
}

/* .total-sales-amount > p:last-child {
  color: #ef7a53;
} */

.price{
  font-weight: bold;
}
</style>